﻿using Tisonet.Dobrak.Domain.Models;

namespace Tisonet.Dobrak.Client.WP8.ViewModels
{
    public class ProjectionViewModel : ViewModelBase
    {
        private string _projectionName;
        private string _projectionDate;

        public ProjectionViewModel(Projection model)
        {
            ProjectionName = model.Name;
            ProjectionDate = model.Date.ToString("f");
            ID = model.ID;
        }

        public string ProjectionName
        {
            get { return _projectionName; }
            private set 
            { 
                if (_projectionName != value)
                {
                    _projectionName = value;

                    NotifyPropertyChanged("ProjectionName");
                }
                
            }
        }

        public string ProjectionDate
        {
            get { return _projectionDate; }
            set
            {
                if (_projectionDate != value)
                {
                    _projectionDate = value;
                    NotifyPropertyChanged("ProjectionDate");
                }
             
            }
        }

        public string ID { get; set; }

    }
}
